<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增系统')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-platform-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">名称：</label>
            <div class="col-sm-8">
                <input name="name" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8">
                <input name="type" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">系统地址：</label>
            <div class="col-sm-8">
                <input name="url" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">系统标题：</label>
            <div class="col-sm-8">
                <input name="title" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input name="remark" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    $("#form-platform-add").validate({
        focusCleanup: true
    });

    var isClick = true;
    function submitHandler() {
        if ($.validate.form() && isClick) {
            isClick = false;
            $.operate.save( "/sso/platform/add", $('#form-platform-add').serialize());
            setTimeout(() => {
                parent.location.reload();
                $.modal.close();
            }, 1000);

        }
    }
</script>
</body>
</html>